home *** CD-ROM | disk | FTP | other *** search
- void __regargs __autoopenfail (char *);
-
- #include <proto/exec.h>
- #include <utility/tagitem.h>
-
- struct Library *I2C_Base;
- static void *libbase;
- extern long __oslibversion;
-
- void __stdargs _STI_openi2c (void)
- {
- long old_os_lib = __oslibversion;
-
- __oslibversion = 38L;
-
- I2C_Base = libbase = (void *) OpenLibrary ("i2c.library", __oslibversion);
- if (!I2C_Base)
- __autoopenfail ("i2c.library");
-
- __oslibversion = old_os_lib;
- }
-
- void __stdargs _STD_closei2c (void)
- {
- if (libbase) {
- CloseLibrary ((struct Library *) libbase);
- libbase = I2C_Base = NULL;
- }
- }
-